package com.ruoyi.InboundManagement.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.InboundManagement.mapper.PendingInspectionInboundMapper;
import com.ruoyi.InboundManagement.domain.PendingInspectionInbound;
import com.ruoyi.InboundManagement.service.IPendingInspectionInboundService;

/**
 * 待检入库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-03
 */
@Service
public class PendingInspectionInboundServiceImpl implements IPendingInspectionInboundService 
{
    @Autowired
    private PendingInspectionInboundMapper pendingInspectionInboundMapper;

    /**
     * 查询待检入库管理
     * 
     * @param inspectionId 待检入库管理主键
     * @return 待检入库管理
     */
    @Override
    public PendingInspectionInbound selectPendingInspectionInboundByInspectionId(Long inspectionId)
    {
        return pendingInspectionInboundMapper.selectPendingInspectionInboundByInspectionId(inspectionId);
    }

    /**
     * 查询待检入库管理列表
     * 
     * @param pendingInspectionInbound 待检入库管理
     * @return 待检入库管理
     */
    @Override
    public List<PendingInspectionInbound> selectPendingInspectionInboundList(PendingInspectionInbound pendingInspectionInbound)
    {
        return pendingInspectionInboundMapper.selectPendingInspectionInboundList(pendingInspectionInbound);
    }

    /**
     * 新增待检入库管理
     * 
     * @param pendingInspectionInbound 待检入库管理
     * @return 结果
     */
    @Override
    public int insertPendingInspectionInbound(PendingInspectionInbound pendingInspectionInbound)
    {
        pendingInspectionInbound.setCreateTime(new Date());
        return pendingInspectionInboundMapper.insertPendingInspectionInbound(pendingInspectionInbound);
    }

    /**
     * 修改待检入库管理
     * 
     * @param pendingInspectionInbound 待检入库管理
     * @return 结果
     */
    @Override
    public int updatePendingInspectionInbound(PendingInspectionInbound pendingInspectionInbound)
    {
        return pendingInspectionInboundMapper.updatePendingInspectionInbound(pendingInspectionInbound);
    }

    /**
     * 批量删除待检入库管理
     * 
     * @param inspectionIds 需要删除的待检入库管理主键
     * @return 结果
     */
    @Override
    public int deletePendingInspectionInboundByInspectionIds(Long[] inspectionIds)
    {
        return pendingInspectionInboundMapper.deletePendingInspectionInboundByInspectionIds(inspectionIds);
    }

    /**
     * 删除待检入库管理信息
     * 
     * @param inspectionId 待检入库管理主键
     * @return 结果
     */
    @Override
    public int deletePendingInspectionInboundByInspectionId(Long inspectionId)
    {
        return pendingInspectionInboundMapper.deletePendingInspectionInboundByInspectionId(inspectionId);
    }
}
